========== Data types ========== .. toctree:: :hidden: bool bits Int enum bundle Vec Fix Floating AFix .. _type_introduction: Introduction ============ The language provides 5 base types, and 2 composite types that can be used. * Base types: :ref:`Bool ` , :ref:`Bits ` , :ref:`UInt ` for unsigned integers, :ref:`SInt ` for signed integers and :ref:`Enum `. * Composite types: :ref:`Bundle ` and :ref:`Vec `. .. image:: /asset/picture/types.svg :width: 400px In addition to the base types, Spinal has support under development for: * :ref:`Fixed-point ` numbers (partial support) * :ref:`Auto-range Fixed-point ` numbers (add,sub,mul support) * :ref:`Floating-point ` numbers (experimental support) Finally, a special type is available for checking equality between a BitVector and a bits constant that contains holes (don't care values). An example is shown below: .. code-block:: scala val myBits = Bits(8 bits) val itMatch = myBits === M"00--10--" // - don't care value